package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.ProStation;
import com.indusfo.spc.pojo.Station;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: louk
 * @Description:工序与工位对应表
 * @date: 2019/11/18 14:44
 *
 */
public interface ProStationMapper {

    List<ProStation> queryProList(ProStation proList);

    int insertProStation(@Param("proId") Integer proId, @Param("stationIds") List<Integer> stationIds, @Param("dataState") Integer dataState);


    int defineProList(@Param("proId") Integer proId, @Param("stationIds") List<Integer> stationIds, @Param("dataState") Integer dataState);


    int countProList(ProStation proList);

    List<ProStation> queryByProId(@Param("proId") Integer proId);

    List<Station> queryFilterStation(@Param("station") Station station,@Param("stationIds") List<Integer> stationIds);
    int countFilterStation(@Param("station") Station station,@Param("stationIds") List<Integer> stationIds);
    int updateProStationByWorkshopId(@Param("workshopIds") Integer[] workshopIds,@Param("dataState") Integer dataState);
    int updateProStationByStaId(@Param("staIds") Integer[] staIds,@Param("dataState") Integer dataState);

    /**
     * 查询工序包含指定工位的个数
     * @param stationIds
     * @return
     */
    int queryByStationIds(@Param("stationIds") Integer[] stationIds);


    int queryByProIds(@Param("proIds") Long[] proIds);

}